#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	long Sn = 0;
	int i = 0;
	int n = 0;
	int a = 0;
	printf("input a:");
	scanf("%d", &a);
	printf("input n:");
	scanf("%d", &n);
	int j = a;
	for (i = 0; i < n; i++)
	{
		Sn = Sn + a;
		a = j + 10 * a;
	}
	printf("%d\n", Sn);
	return 0;
}